package com.neuedu.my12306.service.impl;

import java.util.List;

import com.neuedu.my12306.dao.IUserInfoDao;
import com.neuedu.my12306.dao.impl.IUserInfoDaoImpl;
import com.neuedu.my12306.entity.UserInfo;
import com.neuedu.my12306.service.IUserInfoService;

public class IUserInfoServiceImpl implements IUserInfoService, IUserInfoDao {
	private IUserInfoDao userInfoDao = null;
	public IUserInfoServiceImpl() {
		this.userInfoDao = new IUserInfoDaoImpl();
	}
	@Override
	public UserInfo login(String userName, String userPass) {
		return userInfoDao.login(userName, userPass);
	}
	@Override
	public boolean reg(UserInfo userInfo) {
		
		return userInfoDao.reg(userInfo);
	}
	@Override
	public int findTotal() {
		
		return userInfoDao.findTotal();
	}
	@Override
	public List<UserInfo> findUserInfos(int page, int size) {
		
		return  userInfoDao.findUserInfos(page, size);
	}
	@Override
	public boolean deleteByIds(String[] ids) {
		
		return userInfoDao.deleteByIds(ids);
	}
	@Override
	public boolean addUser(UserInfo userInfo) {
		
		return userInfoDao.addUser(userInfo);
	}
	@Override
	public UserInfo findUserInfoByid(String userName) {
		
		return userInfoDao.findUserInfoByid(userName);
	}
	@Override
	public boolean editUserInfo(UserInfo userInfo) {
		return userInfoDao.editUserInfo(userInfo);
	}
	@Override
	public UserInfo findByIdNumber(String idNumber) {
		
		return userInfoDao.findByIdNumber(idNumber);
	}

}
